<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML>
<html>
  <head>
    
    <title>项目管理系统-项目列表</title>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
    <script type="text/javascript" src="js/jQuery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<style type="text/css">
		body{
			padding-top:30px;
			background-color: #C0DEED;
			background-image: url("img/pro-bg.png");
			background-repeat:no-repeat;
		}
		
		.body-bgc{
			padding-top:20px;
			background-color:#bod4e5;
			background: url("img/wash-white-30.png") repeat scroll 0 0 transparent;
		}
		
	</style>
  </head>
  
  <body>
  <%@ include file="include/topbar.jsp" %>
  	<div class="container body-bgc">
  		<div class="span8 offset1">
  		<div class="page-header">
		   	 	<h2>成员列表</h2>
		 </div>
  			<a href="employee.jspx?m=add" class="btn btn-success" style="margin-bottom: 10px;">
  				<i class="icon-plus icon-white"></i>
  				添加成员
  			</a>
  			<div class="span8">
		      <table class="table">
		        <thead>
		          <tr>
		            <th width="10%">#</th>
		            <th width="30%">用户姓名</th>
		            <th width="30%">状态</th>
		            <th width="30%">操作</th>
		          </tr>
		        </thead>
		        <tbody>
		        <!-- 迭代显示所有雇员 -->
		        <c:forEach items="${requestScope.employees }" var="employee" varStatus="s">
		        	<c:if test="${employee.enable }">
		          <tr>
		            <td>${s.count }</td>
		            <td>${employee.username }</td>
		            <td>${employee.enable ? '可用' : '不可用'}</td>
		            <td>
		            	<div data-toggle="buttons-radio" class="btn-group">
		            		<a  data-toggle="modal" href="#my${employee.id }" class="btn btn-primary ">修改</a>
		            		<a href="employee.jspx?id=${employee.id}&m=del" class="btn btn-danger ">删除</a>
	                	</div>
		            </td>
		          </tr>
		          
				    <div class="modal fade" id="my${employee.id }">
					<form action="employee.jspx?id=${employee.id}&m=modify" method="post">
					    <div class="modal-header">
						    <a class="close" data-dismiss="modal">×</a>
						    <h3>修改雇员信息</h3>
						    </div>
						    <div class="modal-body">
									<div class="control-group">
										<label for="input01" class="control-label">用户名</label>
										<div class="controls">
										 <input type="text" value="${employee.username }" disabled="" id="input01" class="input-xlarge">
										</div>
										<label for="input01" class="control-label">重置密码</label>
										<div class="controls">
										  <input type="password" id="input01" name="password" class="input-xlarge">
										</div>
									 </div>
								
								</div>
								<div class="modal-footer">
									<a href="#" class="btn" data-dismiss="modal">关闭</a>
									<input type="submit" value="修改" class="btn btn-primary">
								</div>
							</form>	
				    </div>
				    </c:if>
		         </c:forEach>
		         <!-- 迭代结束 -->
		        </tbody>
		     </table>
    	  </div>
  		</div>
  	</div>
  	
  </body>
</html>
